<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .box{
            width: 50px;
            height: 50px;
            background:#eee;
            margin: 0 auto;
        }
    </style>
</head>
<body>
    <div class="box" id="box"></div>
    <script>
    var box = document.getElementById('box');
    var i = 0;
    box.onclick = function(){
        i++;
        if(i%2){
            this.style.width = '200px';
            this.style.height = '200px';
            this.innerHTML = '大';
        }else{
            this.style.width = '50px';
            this.style.height = '50px';
            this.innerHTML = '小';
        } 
    };
    </script>
    <a href="C:\Users\Administrator\Desktop\DOM\181164331杨澳\第七章.html">返回上一级</a>
</body>
</html>